add .devcontainer#9
Conversation
Signed-off-by: Quanyi Ma <eli@patch.sh>
There was a problem hiding this comment.
Pull Request Overview
This PR adds a development container configuration to the project to provide a consistent development environment. The setup includes Rust toolchain, Buck2 build system, and various development tools in an Ubuntu 24.04 container.
Key changes:
- Adds Docker-based development environment with Rust and Buck2 tooling
- Configures VS Code extensions and settings for Rust development
- Sets up high-resource requirements for development workloads
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .devcontainer/setup.sh | Installation script for development dependencies and toolchain |
| .devcontainer/devcontainer.json | VS Code dev container configuration with extensions and resource requirements |
| .devcontainer/Dockerfile | Docker configuration based on Ubuntu 24.04 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -0,0 +1,38 @@ | |||
| ## update and install some things we should probably have | |||
There was a problem hiding this comment.
Shell scripts should start with a shebang line (e.g., #!/bin/bash) to explicitly specify the interpreter.
| git lfs install | ||
|
|
||
| ## Install Buck2 | ||
| wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst |
There was a problem hiding this comment.
The wget command downloads to the current directory (/home/), but the zstd command expects the file to be in /home/. This works correctly, but the path inconsistency could be confusing. Consider using explicit paths or downloading directly to /home/.
| wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst | |
| wget -O /home/buck2-x86_64-unknown-linux-gnu.zst https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst |
| libseccomp-dev | ||
|
|
||
| ## Install rustup and common components | ||
| curl https://sh.rustup.rs -sSf | sh -s -- -y |
There was a problem hiding this comment.
Downloading and executing scripts directly from the internet without verification poses a security risk. Consider verifying the script's checksum or using a specific version instead of the latest.
| curl https://sh.rustup.rs -sSf | sh -s -- -y | |
| # Download and verify rustup-init (pinned version) | |
| RUSTUP_VERSION=1.26.0 | |
| RUSTUP_ARCH=x86_64-unknown-linux-gnu | |
| RUSTUP_URL="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUSTUP_ARCH}/rustup-init" | |
| RUSTUP_SHA256_URL="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUSTUP_ARCH}/rustup-init.sha256" | |
| wget -O /tmp/rustup-init "$RUSTUP_URL" | |
| wget -O /tmp/rustup-init.sha256 "$RUSTUP_SHA256_URL" | |
| cd /tmp | |
| sha256sum -c rustup-init.sha256 | |
| if [ $? -ne 0 ]; then | |
| echo "rustup-init checksum verification failed!" >&2 | |
| exit 1 | |
| fi | |
| chmod +x rustup-init | |
| ./rustup-init -y | |
| cd - |
| git lfs install | ||
|
|
||
| ## Install Buck2 | ||
| wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst |
There was a problem hiding this comment.
Using 'latest' for the Buck2 download makes the build non-reproducible. Consider pinning to a specific version for consistency across environments.
Signed-off-by: Quanyi Ma <eli@patch.sh>
add .devcontainer
No description provided.